package io;

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "WKJ";
        int age = 40;
        String gender = "女";
        String[] otherIfo = {"嗓门大","黑","编程技术好","人美心灵美"};
        Person p = new Person(name,age,gender,otherIfo);
        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutput oos = new ObjectOutputStream(fos);
        oos.writeObject(p);
        System.out.println("写出完毕");

        oos.close();

    }
}
